package com.weimob.cloud.api.shop.req;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 微盟查询商品列表请求参数
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class WeimobShopGetGoodsListReq implements Serializable {

    @JsonProperty("pageNum")
    private Integer pageNum;

    @JsonProperty("pageSize")
    private Integer pageSize;
    @JsonProperty("queryParameter")
    private QueryParameterDTO queryParameter;

    @JsonProperty("basicInfo")
    private BasicInfoDTO basicInfo;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class QueryParameterDTO implements Serializable {

        @JsonProperty("searchOptionType")
        private Integer searchOptionType;

        @JsonProperty("search")
        private String search;
        @JsonProperty("goodsStatus")
        private Integer goodsStatus;

        @JsonProperty("searchType")
        private Integer searchType;
        @JsonProperty("sortType")
        private Integer sortType;

        @JsonProperty("classifyId")
        private Integer classifyId;
        @JsonProperty("minSalePrice")
        private Integer minSalePrice;

        @JsonProperty("goodsTagIdList")
        private List<String> goodsTagIdList;
        @JsonProperty("startUpdateTime")
        private Long startUpdateTime;

        @JsonProperty("sort")
        private Integer sort;
        @JsonProperty("endUpdateTime")
        private Long endUpdateTime;

        @JsonProperty("maxSalePrice")
        private Integer maxSalePrice;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class BasicInfoDTO implements Serializable {

        @JsonProperty("vid")
        private Long vid;

        @JsonProperty("vidCode")
        private String vidCode;
    }
}
